package pcb.models.vo 
{
	import pcb.models.ModelLocator;
	
	/**
	 * ...
	 * @author ...
	 */
	public class Interaction
	{
		public static const CLICK:String = "click";
		public static const DOUBLE_CLICK:String = "double_click";
		public static const DRAG_DROP:String = "dnd";
		public static const ENTER:String = "enter";
		public static const FIB:String = "fib";
		
		public static const COMPLETE:String = "complete";
		
		private var _id:String;
		private var _type:String;
		private var _annotation:Annotation;
		private var _answer:FIBAnswer;
		
		protected static var models:ModelLocator = ModelLocator.getInstance();
		
		public function Interaction(in_id:String, in_type:String, in_annotation:XMLList = null, in_answer:XMLList = null) 
		{
			_id = in_id;
			_type = in_type;
			if(in_annotation.children().length() > 0) _annotation = new Annotation(models.localeModel.getLabelbyId(in_annotation.label), in_annotation.orientation);
			if(in_answer.children().length() > 0) 	_answer = new FIBAnswer(in_answer.numeric == "true", in_answer.case_sensative == "true", models.localeModel.getLabelbyId(in_answer.label));
		}
		
		public function get id():String { return _id; }
		
		public function get type():String { return _type; }
		
		public function get annotation():Annotation { return _annotation; }
		
		public function get answer():FIBAnswer { return _answer; }
		
	}
	
}